package com.tengju.support.domain.model.wx;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum WechatChannelStatus {

    CONFIRM(0, "已确认"),
    NOT_CONFIRM(1, "未确认"),
    ;

    private Integer val;
    private String desc;

    public Integer getVal() {
        return val;
    }

    public String getDesc() {
        return desc;
    }

    public static WechatChannelStatus fromVal(Integer val) {
        if (val == null) {
            return null;
        }
        for (WechatChannelStatus status : values()) {
            if (status.val.equals(val)) {
                return status;
            }
        }
        return null;
    }
}
